home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 43
/
Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso
/
-serious-
/
programming
/
e
/
speedtests
/
speedtests.readme
< prev
next >
Wrap
Text File
|
1999-06-14
|
2KB
|
47 lines
Short: How to optimize in E
Author: misha@femina.com.pl (Michal Durys)
Uploader: misha@femina.com.pl (Michal Durys)
Version: 1.0 (30.5.99)
Type: dev/e
Keywords: e optimization misha polska poland
.---------------------------.
-------------( DESCRIPTION )
`---------------------------'
This package is a result of my adventures with code optimization in E. I
want my programs to be as fast as it's only possible. To achieve this I
did many tests. Now I decided to release the results to public.
These tests are fairly simple but very meaningful. Eg. did you know that
FOR i:=0 TO LOOP_COUNTER DO something
is almost ten times faster than
FOR i:=0 TO LOOP_COUNTER
something
ENDFOR
Just look at the included results and you will discover more intersting
facts. All timings were done on my A1200 equipped with Apollo 1240/040
(overclocked) turbo board.
But remember that the tests are not fully reliable, for example edit
increase.e and remove some tests like this:
PROC main()
test({addone}, 'x:=x+1', LOTS_OF_TIMES) ; x:=0
-> test({addql}, 'ADDQ.L #1,x', LOTS_OF_TIMES) ; x:=0
-> test({addqb}, 'ADDQ.B #1,x', LOTS_OF_TIMES) ; x:=0
test({increase}, 'INC x', LOTS_OF_TIMES) ; x:=0
ENDPROC
Compile the program and when you execute it you will get different results.
I was not able to track down the reason. If you can fix it be my guest.
.---------------------------.
-------------( DISTRIBUTION )
`---------------------------'
This package is public domain.